define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_changePassword(result) {
			if(false) {
                 result = '{"success": true,"msg": "修改成功","result": null,"process_time": 1385615688}';
                 return JSON.parse(result);
			} else {
				return result;
			}
		}
		//返回信息
		return {
			//修改密码
			change_password: function(old_pass,new_pass,callback) {
				//post请求
				Http.post({
					method: 'member.security',
					old_password: old_pass,
					new_password: new_pass
				}, function(result) {
					//函数回调
					if(callback){
						callback(get_data_changePassword(result));
					}
						

				}, function(e) {

				}, function() {

				});
			},
		};
	}
	factory.$inject = ['Http'];
	return app.registerService("T_password", factory);
});